<template>
  <div>
    <div id="LineChart" style="width: 400px; height: 200px">基础折线图</div>
  </div>
</template>

<script>
import * as echarts from "echarts";

export default {
  data() {
    return {};
  },
  mounted() {
    var LineChart = echarts.init(document.getElementById("LineChart"));
    var LineChartOption = {
      title: {
        text: "基础折线图",
      },
      xAxis: {
        //x坐标轴
        type: "category", //设置坐标轴的含义
        data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
      },
      yAxis: {
        //y坐标轴
        type: "value",
      },
      series: [
        {
          data: [150, 230, 224, 218, 135, 147, 260],
          type: "line",
        },
      ],
    };
    LineChart.setOption(LineChartOption);
    // ===========================================================================================
  },
};
</script>
<style lang='less' scoped>
</style>